home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / DAWG14.422 < prev    next >
Text File  |  1993-02-23  |  7KB  |  221 lines

  1. 1[2DAWG14.MOD1]   0Add network and subname to prompt
  2. Dawg #1 @13498
  3. Sat Feb 20 17:37:44 1993
  4. ╔══════════════════════════════════════════════════════════════════════════╗
  5. ║ MOD     :DAWG14.MOD - Show network and subname when reading posts.       ║
  6. ║ DATE    :02/18/93                                                        ║
  7. ║ USAGE   :WWIV 4.22                                                       ║
  8. ║ VERSION :1.15                                                            ║
  9. ║ Descrip.:This will optionally show the user the network and sub name     ║
  10. ║          while reading message bases.                                    ║
  11. ║ Diff.   :3  (on a scale of 1-10, 1 being easy)                           ║
  12. ║ Author  :6Dawg0   116@134722/116@1134980                                           ║
  13. ║ BBS     :6Thunder2world0                                                    ║
  14. ║ Thanx to:4Fish7Bone0 of 7Star4Base0 4Fish7Bone0 (3478 net/13454 link)             ║
  15. ║            for beta testing this mod and for his countless suggestions   ║
  16. ║            some of which were implemented.                               ║
  17. ╚══════════════════════════════════════════════════════════════════════════╝
  18.  
  19. Okay another 7Fish4Bone0 inspired mod.  He has 80+ subs on his board and
  20. lately he decided to actually read them.  With a clear screen mod in, it
  21. was sometimes difficult to remember which sub he was on.  He asked if I could
  22. put a mod in to show the name.  I've seen them before, but I personally didn't
  23. like them (don't really know why).  So I decided I would put it in, but it
  24. would have to be toggleable in the defaults since *I* didn't want it showing
  25. up on my screen.  Then greedy person that he is, after I got it working, he
  26. then wanted it to also show the network that the sub was on.  Since I had
  27. removed it from the header of the message, I thought I'd shove it in too.
  28.  
  29.  
  30. Well on with the mod. :)
  31.  
  32.  
  33.  
  34. Step 1:
  35. -------
  36. BACK UP YOUR SOURCE CODE!!!!!!!!   If something goes wrong or you
  37. don't like the mod, you have something to go back to.
  38.  
  39. Step 2:
  40. -------
  41. Load up VARDEC.H and add the following line to the userrec.sysstatus part
  42. of the code:
  43.  
  44. /* userrec.sysstatus */
  45. #define sysstatus_ansi 0x0001
  46. #define sysstatus_color 0x0002
  47. #define sysstatus_music 0x0004
  48. #define sysstatus_pause_on_page 0x0008
  49. #define sysstatus_expert 0x0010
  50. #define sysstatus_smw 0x0020
  51. #define sysstatus_full_screen 0x0040
  52. #define sysstatus_nscan_file_system 0x0080
  53. #define sysstatus_funky_colors 0x0100
  54. #define sysstatus_clr_scrn 0x0200
  55. #define sysstatus_upper_ASCII 0x0400
  56. #define sysstatus_two               0x0800
  57. #define sysstatus_three             0x1000
  58. #define sysstatus_four              0x2000
  59. #define sysstatus_subname           0x4000   /*ADD ME*/
  60. #define sysstatus_fancy             0x8000
  61.  
  62. Your will likely look different than mine.  I added the one for fancy ansi,
  63. and taking Tolkien's suggestion put some fillers in and worked backwards.
  64. You can make it any unused one you wish.
  65.  
  66.  
  67.  
  68. Step 3:
  69. -------
  70. Okay, now we save VARDEC.H and head for DEFAULTS.C.  I've got several other
  71. options in defaults, so things *might* look a bit different in your copy of
  72. source.  I externalize all my mod strings into their own file and encourage
  73. you to do the same.  However, for practicality, any string that Wayne didn't
  74. include with the source will be put in normally, and left up to you if you
  75. wish to externalize it.
  76.  
  77. Go down to void print_cur_stat(void), and add the following lines:
  78.  
  79.  
  80.  
  81.   if (okansi()) {
  82.     pl(get_string(397));
  83.     outstr(get_string(398)); npr("%s\r\n",
  84.       ((thisuser.defed) && (thisuser.defed<=numed))?
  85.     editors[thisuser.defed-1].description:get_string(5));
  86.     outstr(get_string(399)); npr("%s\r\n",
  87.       (thisuser.sysstatus & sysstatus_funky_colors)?str_yes:str_no);
  88.   }
  89.   outstr(get_string(400)); npr("%d\r\n",thisuser.optional_val);
  90.  
  91.   /*ADD the following lines*/
  92.   npr(("E. Show name/network : %s"),
  93.      (thisuser.sysstatus & sysstatus_subname)?get_string(389):get_string(390));
  94.   nl();
  95.   /*to here*/
  96.  
  97.  
  98.  
  99. Step 4:
  100. -------
  101. Further down in DEFAULTS.C we get to make more changes.  Again, I have a
  102. few other modifications to my defaults section so you don't necessarily have
  103. to use the same letter I chose, etc.
  104.  
  105. Go down to void defaults(void), and change the two ONEK lines.  You might also
  106. want to edit strings 477 & 478 in bbs.str to show the new options:
  107.  
  108.   done=0;
  109.   print_cur_stat();
  110.   do {
  111.     tleft(1);
  112.     if (hangup)
  113.       return;
  114.     nl();
  115.     helpl=4;
  116.     if (okansi()) {
  117.       prt(2,get_string(477));
  118.       ch=onek("Q?123456789ABCDEW");  /*Change me, add the letter you wish*/
  119.     } else {                         /*to use,I use E for this*/
  120.       prt(2,get_string(478));
  121.       ch=onek("Q?1234567BDEW");      /*This one too*/
  122.     }
  123.     switch(ch) {
  124.       case 'Q':
  125.  
  126. Step 5:
  127. -------
  128. Further down in the same void we get to make more changes.  Make sure you are
  129. using the same letter in all of these places (I use 'E').  You need to add
  130. the entire case in:
  131.  
  132.       case 'B':
  133.     optional_lines();
  134.     break;
  135.       /* ADD FROM HERE*/
  136.       case 'E':
  137.     if (thisuser.sysstatus & sysstatus_subname)
  138.       thisuser.sysstatus ^= sysstatus_subname;
  139.     nl();
  140.     prt(5,"Show subname/network? ");
  141.     if (yn())
  142.       thisuser.sysstatus |= sysstatus_subname;
  143.     break;
  144.       /* TO HERE*/
  145.       case 'W':
  146.     enter_regnum();
  147.     break;
  148.  
  149. Step 6:
  150. -------
  151. Okay, now we save DEFAULTS.C, and load up MSGBASE1.C.  Our changes take
  152. place in void scan.  First off you need to add a variable at the top:
  153.  
  154. void scan(int msgnum, int optype, int *nextsub)
  155. {
  156.   char s[81],s1[81],s2[81],*b,*ss1,s8[81];    /* ADD s8[81]*/
  157.   int i,i1,i2,done,quit,abort,next,val,realexpress;
  158.   slrec ss;
  159.  
  160.  
  161. Okay a bit further down make the following additions:
  162.  
  163.   do {
  164.     tleft(1);
  165.     if (xsubs[curlsub].num_nets)
  166.       set_net_num(xsubs[curlsub].nets[0].net_num);
  167.     else
  168.       set_net_num(0);
  169.     switch(optype) {
  170.       case 0: /* Read Prompt */
  171.     /*ADD FROM HERE */
  172.     if (xsubs[curlsub].num_nets) {
  173.       set_net_num(xsubs[curlsub].nets[0].net_num);
  174.       sprintf(s8,"1Net 2: 7[6%s7]0\r\n",net_name);
  175.     } else {
  176.       set_net_num(0);
  177.       sprintf(s8,"1Net 2: 7[6Local7]0\r\n");
  178.     }
  179.     sprintf(s1,"1Sub 2: 7[6%s7]0\r\n",subboards[curlsub].name);
  180.     /*DOWN TO HERE, YOU CAN ALSO COLOR THE NEXT LINE IF YOU WISH*/
  181.  
  182.     sprintf(s,"1%s2:7(11-%u6,^1%u7)1,? 2:0",get_string(678), nummsgs,msgnum);
  183.     nl();
  184.     if (express) {
  185.       s[0]=0;
  186.       nl();
  187.       nl();
  188.     } else {
  189.     /* ADD THE NEXT GROUP OF LINES*/
  190.       if (thisuser.sysstatus & sysstatus_subname) {
  191.         prt(1,s8);
  192.         prt(1,s1);
  193.       }
  194.     /*DOWN TO HERE*/
  195.  
  196.       prt(2,s);
  197.       helpl=16;
  198.       input(s,3);
  199.       while (s[0]==32) {
  200.         strcpy(s1,&(s[1]));
  201.         strcpy(s,s1);
  202.       }
  203.     }
  204.     optype=0;
  205.     i=atoi(s);
  206.  
  207.  
  208. Okay now save MSGBASE1.C and recompile.  A full one unfortunately, but just
  209. think of how much fun you can have....
  210.  
  211.  
  212.  
  213. If you have any problems with this mod, feel free to contact me.  My net
  214. address is 1@3472, and my link address is 1@13498.  I will do what I can
  215. to help.  Oh and one last thing, if anyone does actually use this mod,
  216. I'd appreciate a short note through the net or link telling me that.
  217.  
  218. Thanks,
  219.  
  220.                           6Dawg0
  221.